package com.codedancer.campus.client.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.codedancer.campus.client.service.bo.user.SetBasicMessageBo;
import com.codedancer.campus.client.service.bo.user.UpdatePasswordBo;
import com.codedancer.campus.client.service.bo.user.UpdatePhoneBo;
import com.codedancer.campus.client.service.bo.user.UserFollowPageSearchBo;
import com.codedancer.campus.client.service.bo.user.UserLoginBo;
import com.codedancer.campus.client.service.bo.user.UserUpdateAvatarBo;
import com.codedancer.campus.client.service.bo.user.UserUpdateBackgroundImageBo;
import com.codedancer.campus.client.service.bo.user.UserUpdateInfoBo;
import com.codedancer.campus.client.service.vo.user.UserFollowVo;
import com.codedancer.campus.client.service.vo.user.UserInfoVo;
import com.qq.connect.QQConnectException;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.security.NoSuchAlgorithmException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public interface IUserService {


    /**
     * 用户手机号登录
     * @param userLoginBo 用户登录Bo
     * @return
     */
    String loginByPhone(UserLoginBo userLoginBo)
        throws UnsupportedEncodingException, NoSuchAlgorithmException;

    /**
     * 获取当前用户信息
     * @param currentLoginUuid 当前用户uuid
     * @return
     */
    UserInfoVo currentUserInfo(String currentLoginUuid);

    /**
     * 修改头像
     * @param userUpdateAvatarBo 修改头像Bo
     */
    void updateAvatar(UserUpdateAvatarBo userUpdateAvatarBo);

    /**
     * 修改用户信息
     * @param userUpdateInfoBo
     */
    void updateUserInfo(UserUpdateInfoBo userUpdateInfoBo);

    /**
     * 根据用户uuid获取用户信息
     * @param userUuid
     * @return
     */
    UserInfoVo getByUserUuid(String userUuid);

    /**
     * QQ回调登录
     * @param request
     * @param response
     * @return
     */
    void loginByQQ(HttpServletRequest request, HttpServletResponse response)
        throws QQConnectException, IOException, NoSuchAlgorithmException;

    /**
     * 设置基本信息
     * @param setBasicMessageBo
     */
    void setBasicMessage(SetBasicMessageBo setBasicMessageBo);

    /**
     * 修改密码（返回token）
     * @param updatePasswordBo
     */
    String updatePassword(UpdatePasswordBo updatePasswordBo)
        throws UnsupportedEncodingException, NoSuchAlgorithmException;

    /**
     * 关注用户
     * @param uuid 被关注用户uuid
     * @param currentLoginUuid 关注用户uuid
     */
    void follow(String uuid, String currentLoginUuid);

    /**
     * 取消关注用户
     * @param uuid 被关注用户uuid
     * @param currentLoginUuid 关注用户uuid
     */
    void cancelFollow(String uuid, String currentLoginUuid);

    /**
     * 是否关注
     * @param uuid 被关注用户uuid
     * @param currentLoginUuid 关注用户uuid
     * @return
     */
    Boolean isFollow(String uuid, String currentLoginUuid);

    /**
     * 分页查询关注用户
     * @param userFollowPageSearchBo
     * @return
     */
    IPage<UserFollowVo> pageFollow(UserFollowPageSearchBo userFollowPageSearchBo);

    /**
     * 修改背景图
     * @param userUpdateBackgroundImageBo
     */
    void updateBackgroundImage(UserUpdateBackgroundImageBo userUpdateBackgroundImageBo);

    /**
     * 修改手机号
     * @param updatePhoneBo
     */
    void updatePhone(UpdatePhoneBo updatePhoneBo);

    /**
     * 密码登录
     * @param userLoginBo
     */
    String loginByPassword(UserLoginBo userLoginBo)
        throws UnsupportedEncodingException, NoSuchAlgorithmException;
}
